<!DOCTYPE html>
<html>
<head lang="cn">
    <meta charset="UTF-8">
    <title>后台管理</title>
    <meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
<#include "../../common/resources/resources-admin-lte-css.ftl">
<#include "../../common/resources/resources-bsgrid-css.ftl">
</head>
<body class="skin-blue-light sidebar-mini">
<div class="wrapper">
<#include "../common/header.ftl">
<#include "../common/aside.ftl">
    <div class="content-wrapper">

        <section class="content-header">
            <h1>
                站点
                <small>管理</small>
            </h1>
            <ol class="breadcrumb">
                <li><a href="#"><i class="fa fa-dashboard"></i> 首页</a></li>
                <li><a href="#">相关设置</a></li>
                <li class="active">站点管理</li>
            </ol>
        </section>


        <!-- Main content -->
        <section class="content">
            <div class="row">
                <div class="col-md-12">
                    <div class="box">
                        <div class="box-header with-border">
                            <h3 class="box-title">站点管理</h3>
                            <input id="add" class="btn btn-info pull-right" type="button" data-toggle="modal"
                                   href="/admin/admin/add" data-target="#addModal" value="添加">
                            <input id="edit" class="btn btn-info pull-right" type="button" data-toggle="modal"
                                   href="/admin/admin/edit-by-id" data-target="#editModal" value="修改">
                        </div>
                        <!-- /.box-header -->
                        <div class="box-body">
                        <#include "../common/callout.ftl">
                            <table id="searchTable" style="width:100%;">
                                <tr>
                                    <th w_check="true" w_index="ID" width="3%;"></th>
                                    <th w_index="id" width="5%;">ID</th>
                                    <th w_index="username">用户名</th>
                                    <th w_index="roleId" w_align="left">角色ID</th>
                                </tr>
                            </table>

                        <#--添加-->
                            <div class="modal fade in" id="addModal">
                                <div class="modal-dialog modal-lg">
                                    <div class="modal-content"></div>
                                    <!-- /.modal-content -->
                                </div>
                                <!-- /.modal-dialog -->
                            </div>
                            <!--/.modal -->
                        <#--添加站点结束-->
                        <#--修改-->
                            <div class="modal fade in" id="editModal">
                                <div class="modal-dialog modal-lg">
                                    <div class="modal-content"></div>
                                    <!-- /.modal-content -->
                                </div>
                                <!-- /.modal-dialog -->
                            </div>
                            <!--/.modal -->
                        <#--修改结束-->

                        </div>
                        <!--/.box-body-->
                    </div>
                    <!-- /.box -->
                </div>
                <!--/.col-->
            </div>
            <!--/.row-->
        </section>
        <!-- /.content -->

    </div>
<#include "../common/footer.ftl">
</div>

<#include "../../common/resources/resources-admin-lte-js.ftl">
<script type="text/javascript" src="${ctx }/static/scripts/jquery.serializeJSON-2.6.1/jquery.serializejson.js"></script>
<#include "../../common/resources/resources-bsgrid-js.ftl">
<script type="text/javascript" src="${ctx }/static/scripts/bootbox-4.4.0.js"></script>

<script type="text/javascript" src="${ctx }/static/scripts/common/common-admin.js"></script>
<script>
    var gridObj;
    $(function () {
        gridObj = $.fn.bsgrid.init('searchTable', {
            url: '${ctx}/admin/admin/get-paged',
            // autoLoad: false,
            pageSizeSelect: true,
            stripeRows: true,
            // 不显示空白航
            displayBlankRows: false,
            pageSize: 10,
            // 分页大小选择下拉框
            pageSizeForGrid: [10, 20, 30, 50],
            // 划过行变色
            rowHoverColor: true,
            extend: {
                settings: {
                    // 支持拖动
                    supportColumnMove: true
                }
            }
        });
    });
</script>
</body>
</html>